package com.liu.service.impl;

import com.liu.entity.Order;
import com.liu.mapper.OrderMapper;
import com.liu.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Order)表服务实现类
 *
 * @author makejava
 * @since 2023-02-11 12:38:11
 */
@Service("orderServiceImpl")
public class OrderServiceImpl implements OrderService {
    @Resource
    private OrderMapper orderMapper;

    @Override
    public Order queryById(Integer id) {
        return this.orderMapper.queryById(id);
    }

    @Override
    public List<Order> findAll() {
        return this.orderMapper.findAll();
    }

    @Override
    public List<Order> personOrder(Integer pageNum, Integer pageSize, String num, Integer id) {
        return this.orderMapper.personOrder(pageNum,pageSize,num,id);
    }

    @Override
    public long orderCount(String num, Integer id) {
        return this.orderMapper.orderCount(num,id);
    }

    @Override
    public List<Order> phyOrder(Integer pageNum, Integer pageSize, String num, Integer id,String state) {
        return this.orderMapper.phyOrder(pageNum, pageSize, num, id,state);
    }

    @Override
    public long phySaCount(String num, Integer id,String state) {
        return this.orderMapper.phySaCount(num, id,state);
    }

    @Override
    public List<Order> nowPhyOrder(Integer pageNum, Integer pageSize, String num, Integer id,String state) {
        return this.orderMapper.nowPhyOrder(pageNum, pageSize, num, id,state);
    }

    @Override
    public long nowSaCount(String num, Integer id,String state) {
        return this.orderMapper.nowSaCount(num, id,state);
    }

    @Override
    public int updateState(Integer id) {
        return this.orderMapper.updateState(id);
    }

    @Override
    public List<Order> queryAllByLimit(Integer pageNum, Integer pageSize, String num) {
        return this.orderMapper.queryAllByLimit(pageNum,pageSize,num);
    }

    @Override
    public long count(String num) {
        return this.orderMapper.count(num);
    }

    @Override
    public int insert(Order order) {
        return this.orderMapper.insert(order);
    }

    @Override
    public int insertBatch(List<Order> entities) {
        return this.orderMapper.insertBatch(entities);
    }

    @Override
    public int update(Order order) {
        return this.orderMapper.update(order);
    }

    @Override
    public int deleteById(Integer id) {
        return this.orderMapper.deleteById(id);
    }

    @Override
    public int deleteByIds(List<Integer> ids) {
        return this.orderMapper.deleteByIds(ids);
    }
}
